package generator.controller;

import generator.service.VideoVisitorService;
import ktkt.result.Result;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

/**
 * @author KT917
 * @date 2022/9/21
 */

@Api(value = "VideoVisitor管理", tags = "VideoVisitor管理")
@RestController
@RequestMapping(value = "/admin/vod/videoVisitor")
//@CrossOrigin
public class VideoVisitorController {

    @Autowired
    private VideoVisitorService videoVisitorService;

    //课程统计的接口
    @GetMapping("/findCount/{courseId}/{startDate}/{endData}")
    public Result findCount(
            @PathVariable Long courseId,
            @PathVariable String startDate,
            @PathVariable String endData
    ) {
      Map<String,Object>map=videoVisitorService.findCount(courseId,startDate,endData);
        return Result.ok(map);
    }

}
